import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
const state = {
  counter: 0
}
const mutations = {
  increment (state) {
    state.counter++
  },
  decrement (state) {
    state.counter--
  }
}
const actions = {
  aIncrement ({ commit }) {
    commit('increment')
  },
  aDecrement ({ commit }) {
    commit('decrement')
  }
}
/*export default new Vuex.Store({
  state,
  mutations,
  actions
})*/
export default {
  namespaced:true,
  state,
  mutations,
  actions
}
